﻿using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using AppStore.Domain.DAO;
using AppStore.Domain.Entities;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Moq;
using AppStore.Domain.Abstract;

namespace AppStore.Tests.DomainTests
{
    [TestClass]
    public class ApplicationTests
    {
        [TestMethod]
        public void pobierz_wszystkie_aplikacje()
        {
            //arrange
            Database.SetInitializer(new AppStoreDBInitializer());
            AppStoreDBConnection context = new AppStoreDBConnection("Data Source=(LocalDb)\v11.0;Initial Catalog=aspnet-AppStore-20121201211946;Integrated Security=SSPI;AttachDBFilename=AppStoreDB.mdf");

            //act
            IQueryable <Application> apps = context.Applications;

            //assert
            Assert.AreEqual(apps.Count(),0);
        }
    }
}
